// Define namespace

var <?php ns(); ?> = {};


/**
 * 
 */

<?php ns(); ?>.show = function(classOfIcon, title, message, code, file, line, context)
{
	// Open the dialog box

	Ui_ModalWindow.show
	(
		classOfIcon,
		title,
		message,
		[
			{
				callback: function()
				{
					Ui_ModalWindow.close();
				},
				isClose: true,
				isDefault: true,
				label: '<?php p(str('Ui.Notification.action.close')); ?>'
			}
		],
		true
	);
}


/**
 *
 */

<?php ns(); ?>.showError = function(title, message, code, file, line, context)
{
	<?php

	$classesOfIcons = pref('[Loop]/ui/notifications/classesOfIcons');
	$classOfIcon = $classesOfIcons['error'];

	?>

	<?php ns(); ?>.show('<?php p($classOfIcon); ?>', title, message, code, file, line, context);
}


/**
 *
 */

<?php ns(); ?>.showInformation = function(title, message, code, file, line, context)
{
	<?php

	$classesOfIcons = pref('[Loop]/ui/notifications/classesOfIcons');
	$classOfIcon = $classesOfIcons['information'];

	?>

	<?php ns(); ?>.show('<?php p($classOfIcon); ?>', title, message, code, file, line, context);
}


/**
 *
 */

<?php ns(); ?>.showSuccess = function(title, message, code, file, line, context)
{
	<?php

	$classesOfIcons = pref('[Loop]/ui/notifications/classesOfIcons');
	$classOfIcon = $classesOfIcons['success'];

	?>

	<?php ns(); ?>.show('<?php p($classOfIcon); ?>', title, message, code, file, line, context);
}


/**
 *
 */

<?php ns(); ?>.showWarning = function(title, message, code, file, line, context)
{
	<?php

	$classesOfIcons = pref('[Loop]/ui/notifications/classesOfIcons');
	$classOfIcon = $classesOfIcons['warning'];

	?>

	<?php ns(); ?>.show('<?php p($classOfIcon); ?>', title, message, code, file, line, context);
}
